<template>
	<view class="rich-text-page">
		<view class="title">{{ datse.title }}</view>

		<view class="sub-title-time">
			<view class="sub-title">
				<!-- {{ subTitle }} -->
			</view>
			<view class="time">{{ datse.create_date }}</view>
		</view>
		<view style="height: 25rpx;">

		</view>

		<view class="content" v-html="datse.content"></view>

	</view>
</template>

<script>
	import {
	Articleinfo
	} from '@/utils/user.js'
	

	
	export default {
		data() {
			return {
				datse:{}
			}
		},
		onLoad(e) {
			console.log(e)
			this.out(e.id)
		},
		methods: {
			
			out(e){
				
				// Articleinfo
				// http://123.57.166.202/Article/info?id=2&type=1
				
				var data = {
					id:e,
					type:1
				}
				
				Articleinfo(data).then(res => {
					console.log(res)
				 this.datse = res.data.data
				 
				 
				 // content: "<p><img src="https://banjia-1256205286.cos.ap-beijing.myqcloud.com/AdminUpload/20240522/3b50b5111c4e291ee56120f7af27b86c.png" alt="" data-href="" style=""/></p>"
				 // create_date: "2024-05-22"
				 // create_time: "1716364570"
				 // id: "3"
				 // img: "https://banjia-1256205286.cos.ap-beijing.myqcloud.com/AdminUpload/20240522/50b848bd9e6256d3c706eee8bab6c0b2.png"
				 // status: "1"
				 // title: "打包攻略"
				 
				 
				 
	 
				}).catch(error => {
					console.error('Articleinfo 方法执行出错：', error);
				});
			}
			

			
			
		}
	}
</script>

<style scoped lang="less">
	.rich-text-page {
		padding: 20px;
		font-family: 'Arial', sans-serif;
	}
	
	.title {
		font-size: 36rpx;
		color: #333;
		font-weight: 600;
		text-align: center;
		margin-bottom: 10px;
	}
	
	.content {
		margin-bottom: 20px;
		line-height: 1.6;
	}
	
	/* .content p {
		margin-bottom: 10px;
	} */
	
	.content strong {
		color: #0055ff;
	}
	
	.content a {
		color: #009688;
		text-decoration: none;
	}
	
	.content a:hover {
		text-decoration: underline;
	}
	
	.sub-title-time {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	
	.sub-title {
		font-size: 18px;
		color: #666;
	}
	
	.time {
		font-size: 14px;
		color: #999;
	}

</style>
